﻿@model BookingManagementSystem.Models.BookingModel

@{
    ViewBag.Title = "CreateBooking";
}

<script src="@Url.Content("~/Scripts/JScriptBooking.js")" type="text/javascript"></script>
<script type="text/javascript">
    var discard_URL="@Url.Content("~/Bookings/Index")"
    var del_URL="@Url.Content("~/Bookings/DeleteBooking")"
</script>

<h2>Create Booking</h2>
@using (@Html.BeginForm())
{
    @Html.HiddenFor(m => m.Id, new {id = "ModelId" })
    <p>@Html.LabelFor( m => m.CheckInDate): @Html.TextBoxFor(m => m.CheckInDate) </p>
    <p>@Html.LabelFor(m => m.CheckOutDate): @Html.TextBoxFor(m => m.CheckOutDate) </p>
    <p>@Html.LabelFor(m => m.CustomerId) 
    @Html.DropDownListFor(m => m.CustomerId, @Model.AllCustomers)</p>
    <p>@Html.LabelFor(m => m.RoomId) 
    @Html.DropDownListFor(m => m.RoomId, @Model.AllRooms)</p>
    <p>@Html.LabelFor(m => m.OriginId) 
    @Html.DropDownListFor(m => m.OriginId, @Model.AllOrigins)</p>
    
    <input type="submit" value="Save"/>
    <input type="button" onclick="functionDiscard()" value="Discard"/>
}
